<style>
    .region_city .city-picker-span {
        width: 80% !important;
        position: relative;
    }
</style>

<form class="form-horizontal form-ajax" role="form" data-toggle="validator" method="POST">
    
    <!-- 客户昵称 -->
    <div class="form-group">
        <label for="nickname" class="control-label col-xs-12 col-sm-2">{:__('BusinessNickname')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="nickname" data-rule="required" class="form-control" name="row[nickname]" placeholder="{:__('BusinessNickname')}" type="text" value="{$row.nickname}">
        </div>
    </div>

    <!-- 手机号 -->
    <div class="form-group">
        <label for="mobile" class="control-label col-xs-12 col-sm-2">{:__('Mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="mobile" data-rule="required;" class="form-control" name="row[mobile]" placeholder="{:__('Mobile')}" type="text" value="{$row.mobile}">
        </div>
    </div>
    <!-- 邮箱 -->
    <div class="form-group">
        <label for="email" class="control-label col-xs-12 col-sm-2">{:__('Email')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="email" data-rule="required;" class="form-control" name="row[email]" placeholder="{:__('Email')}" type="text" value="{$row.email}">
        </div>
    </div>

    <div class="form-group">
        <label for="password" class="control-label col-xs-12 col-sm-2">重置密码:</label>
        <div class="col-xs-12 col-sm-8">
            <input type="password" class="form-control" id="password" name="row[password]" placeholder="请输入密码"/>
        </div>
    </div>

    <!-- 性别 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Gender')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="gender" data-rule="required" class="form-control selectpicker" name="row[gender]">
                {foreach name="$SexList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.gender" }selected{/in}>{$vo} </option> 
                {/foreach}
            </select>
        </div>
    </div>

    <!-- 成交状态 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Deal')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select id="deal" data-rule="required" class="form-control selectpicker" name="row[deal]">
                <option value="0" {$row.deal == 0 ? 'selected' : ''}>未成交</option>
                <option value="1" {$row.deal == 1 ? 'selected' : ''}>已成交</option>
            </select>
        </div>
    </div>

    <!-- 客户来源 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('SourceName')}:</label>
        <div class="col-xs-12 col-sm-8">
            {:build_select('row[sourceid]', $SourceList, $row.sourceid, ['class'=>'selectpicker', 'required'=>''])}
        </div>
    </div>

    <!-- 客户地区 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">地区选择:</label>
        <div class="col-xs-12 col-sm-10 region_city">
            <input id="region" data-toggle="city-picker" name="region" type="text" value="{$row['regionCode']}" readonly>
            <!-- 用于提交数据把选中的地区传给后端处理 -->
            <input type="hidden" name="row[code]" id="region-code">
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
